﻿<!DOCTYPE html>
<html lang="en">
<#include "../include/resource-head.ftl"/>
<#assign active='configList'/>
<body>
<#include "../include/common-top.ftl"/>
<div class="main-container" id="main-container">
    <div class="main-container-inner">
    <#include "../include/common-menu.ftl"/>
        <div class="main-content">
            <div class="page-content">
                <div class="col-xs-12">
                    <div class="row-fluid">
                        <div class="widget-box">
                            <div class="widget-header widget-header-blue widget-header-flat">
                                <h4 class="lighter">
                                    <i class="icon-plus"></i>修改配置
                                </h4>
                            </div>
                            <div class="widget-body">
                                <div class="widget-main">
                                    <div class="step-content row-fluid position-relative">
                                        <form class="form-horizontal" action="/admin/config/update" method="post" onsubmit="return form_submit()">
                                            <input type="hidden" name="id" value="${config.id!}"/>
                                            <div class="form-group has-info">
                                                <label
                                                        class="col-xs-12 col-sm-3 control-label no-padding-right">标志</label>
                                                <div class="col-xs-12 col-sm-5">
                                                    <input type="text" class="width-100"  readonly value="${config.nid}"/>
                                                </div>
                                            </div>
                                            <div class="form-group has-info">
                                                <label class="col-xs-12 col-sm-3 control-label no-padding-right">名字</label>
                                                <div class="col-xs-12 col-sm-5">
                                                    <input type="text" class="width-100" name="name" value="${config.name!}"/>
                                                </div>
                                            </div>

                                            <#if config.nid == 'notice'>
                                                <div class="form-group has-info">
                                                    <div class="col-xs-1"></div>
                                                    <div class="col-xs-12 col-sm-10">
                                                        <textarea id="editor" name="value" style="width: 100%;">${config.value}</textarea>
                                                    </div>
                                                </div>
                                            <#else>
                                                <div class="form-group has-info">
                                                    <label class="col-xs-12 col-sm-3 control-label no-padding-right">定制介绍</label>
                                                    <div class="col-xs-12 col-sm-5">
                                                        <textarea class="autosize-transition form-control" name="value">${config.value!}</textarea>
                                                    </div>
                                                </div>
                                            </#if>

                                            <hr/>
                                            <div class="row-fluid wizard-actions">
                                                <button class="btn" type="reset">重置</button>
                                                <button class="btn btn-success" type="submit">提交</button>
                                            </div>
                                        </form>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <!-- /.page-content -->
        </div>
        <!-- /.main-content -->
    </div>
    <!-- /.main-container -->
</body>
<#include "../include/resource-script.ftl"/>
<script type="text/javascript">
    function form_submit() {
        var title = $("input[name='name']").val();
        if (title.length == 0) {
            tipMsg("请输入系统名字");
            return false;
        }
        return true;
    }
</script>
</html>

